<html>
	<head>
		<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1,minimum-scale=1, width=device-width" />
		<include file="./Application/Home/View/Default/header/header.html"/>
	</head>
	<body>
		<div class="col-xs-12 text-center index_top none-both-padding">
			<div class="col-xs-4 search"></div>
			<div class="col-xs-4">登陆</div>
			<div class="col-xs-4"></div>
		</div>
		
		<div class="col-xs-12 login_content">
			<div class="col-xs-12 input_box">
				<span>用户账号：</span><input type="text" name="user_name" value="">
			</div>
			<div class="col-xs-12 input_box">
				<span>用户密码：</span><input type="password" name="user_password" value="">
			</div>

			<div class="col-xs-12 text-center login_word">
				<!-- <div class="col-xs-6"><a href="#">忘记密码</a></div> -->
				<div class="col-xs-12"><a href="/home/index/user_register">注册账号</a></div>
			</div>

			<div class="col-xs-12 login_button">
				<button>登陆</button>
			</div>
		</div>
		
		<include file="./Application/Home/View/Default/header/footer.html"/>

		<script>
				$(".login_button button").click(function(){
					var user_name = $("input[name='user_name']").val();
					var user_password = $("input[name='user_password']").val();
					if(user_name && user_password != ""){
						$.ajax({
							url:"/home/index/login",
							type:'post',
							dataType:'json',
							data:{'username':user_name,'password':user_password},
							success:function(data){
								if(data.code == 200){
									location.href = "/home/index/user"
								}else{
									alert(data.msg);
								}
							}
						})
					}else{
						alert("请完整填写信息");
					}
				})
			</script>

	</body>
</body>
</html>